import React, { Component } from 'react';
import './MySecKill.scss'

class MySecKill extends Component {
    constructor(props){
        super(props);
        let img='https://img0.baidu.com/it/u=3961804852,387484148&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1667926800&t=d81de7662a74458f1c7c6872e09b230c'
        this.state={
            context:[
                {pic:img,previousPrice:'原价￥303',price:'抢购价￥195'},
                {pic:img,previousPrice:'原价￥924',price:'抢购价￥675'},
                {pic:img,previousPrice:'原价￥2826',price:'抢购价￥2543'},
                {pic:img,previousPrice:'原价￥430',price:'抢购价￥413'},
                {pic:img,previousPrice:'原价￥303',price:'抢购价￥195'},
                {pic:img,previousPrice:'原价￥924',price:'抢购价￥675'},
                {pic:img,previousPrice:'原价￥2826',price:'抢购价￥2543'},
                {pic:img,previousPrice:'原价￥430',price:'抢购价￥413'},
                {pic:img,previousPrice:'原价￥430',price:'抢购价￥413'},
            ]
        }
    }
    render() {
        return (
            <div className='secKill'>
            {
             this.state.context.map((item)=>{
                 return(
                    <div className="box">
                        <img src={item.pic} alt="" />
                        <span>{item.previousPrice}</span>
                        <span>{item.price}</span>
                    </div>
                 )
                })
            }
           </div>
        );
    }
}

export default MySecKill;